import { Color, ShaderMaterial, DoubleSide } from "three";
import vertex from "../shader/shield/vertex.glsl";
import fragment from "../shader/shield/fragment.glsl";

export default function(color = new Color("#ffffff")) {
  return new ShaderMaterial({
    vertexShader: vertex,
    fragmentShader: fragment,
    side: DoubleSide,
    transparent: true,
    uniforms: {
      uColor: {
        value: color
      },
      uHeight: {
        value: 0
      }
    }
  });
}